package com.k7k7.db.util;

import org.hibernate.cfg.NamingStrategy;
import org.hibernate.util.StringHelper;

/**
 * User: Administrator
 * Date: 2009-4-23
 * Time: 12:09:22
 */
public class MyNameStrategy implements NamingStrategy {
	@Override
	public String classToTableName(String s) {
		return StringHelper.unqualify(s).toUpperCase();
	}

	@Override
	public String propertyToColumnName(String s) {
		return s.toUpperCase();
	}

	@Override
	public String tableName(String s) {
		return s.toUpperCase();
	}

	@Override
	public String columnName(String s) {
		return s.toUpperCase();
	}

	public String propertyToTableName(String s, String s1) {
		return classToTableName(s) + "_" + propertyToColumnName(s1);
	}

    public String collectionTableName(String arg0, String arg1, String arg2, String arg3, String arg4) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String joinKeyColumnName(String arg0, String arg1) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String foreignKeyColumnName(String arg0, String arg1, String arg2, String arg3) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String logicalColumnName(String arg0, String arg1) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String logicalCollectionTableName(String arg0, String arg1, String arg2, String arg3) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String logicalCollectionColumnName(String arg0, String arg1, String arg2) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
